#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import chatmessage_blueprint
from api_1_0.chatMessageResource.chatMessageResource import ChatMessageResource
from api_1_0.chatMessageResource.chatMessageOtherResource import ChatMessageOtherResource

api = Api(chatmessage_blueprint)

api.add_resource(ChatMessageResource, '/chatMessage/<message_id>', '/chatMessage', endpoint='ChatMessage')


@chatmessage_blueprint.route('/chatmessage/update/<message_id>', methods=['PUT'], endpoint='ChatMessageUpdate')
def update(message_id):
    return ChatMessageOtherResource.sensitive_update(message_id)
